﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CommunitySystemModel;

namespace CommunitySystem.Web.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“GuaZhiDuanLianService”。
    public class GuaZhiDuanLianService : IGuaZhiDuanLianService
    {
        private GuaZhiDuanLianBO bo = new GuaZhiDuanLianBO();
        private JieYongBO jybo = new JieYongBO();
        public System.Collections.ObjectModel.ObservableCollection<CommunitySystemModel.GuaZhiDuanLianJiHuaModel> GetGuaZhiDuanLianJiHuaModel(int zhaoluid, string islocked, int year)
        {
            return bo.GetGuaZhiDuanLianJiHuaModel(zhaoluid, islocked, year);
        }

        public System.Collections.ObjectModel.ObservableCollection<CommunitySystemModel.GuaZhiDuanLianJiHuaModel> GetGuaZhiDuanLianJiHuaModelForCom(string status)
        {
            return bo.GetGuaZhiDuanLianJiHuaModelForCom(status);
        }

        public int InsertJuZhuanAnZhiJiHuaTitle(CommunitySystemModel.GuaZhiDuanLianJiHuaModel ZhaoLuJiHua)
        {
            return bo.InsertJuZhuanAnZhiJiHuaTitle(ZhaoLuJiHua);
        }

        public bool DeleteJuZhuanAnZhiJiHua(int id)
        {
            return bo.DeleteJuZhuanAnZhiJiHua(id);
        }

        public bool SuoJuZhuanAnZhiJiHua(int id)
        {
            return bo.SuoJuZhuanAnZhiJiHua(id);
        }

        public ObservableCollection<Emp_BasicInfoModel> GetGuaZhiDuanLianEmpModel(string empids)
        {
            return bo.GetGuaZhiDuanLianEmpModel(empids);
        }

        public ObservableCollection<GuaZhiEmpModel> GetGuaZhiDuanLianEmpZongModel(int jihuaid, string orgids, string status, ObservableCollection<int> id)
        {
            return bo.GetGuaZhiDuanLianEmpZongModel(jihuaid, orgids, status, id);
        }


        public bool CheckGuaZhiEmp(string ID)
        {
            return bo.CheckGuaZhiEmp(ID);
        }

        public bool TuiGuaZhiEmp(string ID, string memo)
        {
            return bo.TuiGuaZhiEmp(ID, memo);
        }

        public bool CancelGuaZhiEmp(string ID)
        {
            return bo.CancelGuaZhiEmp(ID);
        }

        public bool ZhiWeiAnPai(string ID, GuaZhiEmpModel model, ObservableCollection<GuaZhiEmpModel> list)
        {
            return bo.ZhiWeiAnPai(ID, model,list);
        }

        public bool InsertGuaZhiEmp(string empids,int exameid)
        {
            return bo.InsertGuaZhiEmp(empids, exameid);
        }


        public bool UpdateShiJian(GuaZhiEmpModel model)
        {
            return bo.UpdateShiJian(model);
        }


        public bool YanQiGuaZhiEmp(string ID, string memo, DateTime? riqi)
        {
            return bo.YanQiGuaZhiEmp(ID, memo, riqi);
        }

        public bool ShenHeYanQiGuaZhiEmp(string ID, string istongyi)
        {
            return bo.ShenHeYanQiGuaZhiEmp(ID, istongyi);
        }

        public bool ZhongZhiGuaZhiEmp(string ID, string memo, DateTime? riqi)
        {
            return bo.ZhongZhiGuaZhiEmp(ID, memo, riqi);
        }

        public bool ShenHeShenHeYanQiGuaZhiEmp(string ID)
        {
            return bo.ShenHeShenHeYanQiGuaZhiEmp(ID);
        }


        public bool GetGuaZhiDuanLianEmps(int jihuaid, string empbasicids)
        {
            return bo.GetGuaZhiDuanLianEmps(jihuaid, empbasicids);
        }

        public bool UpdateGuaZhi_ZhengShen(GuaZhiEmpModel model)
        {
            return bo.UpdateGuaZhi_ZhengShen(model);
        }
        public ObservableCollection<GuaZhi_AttatchmentModel> GetZhaoLuZhengShen_Attatchment(int id)
        {
            return bo.GetZhaoLuZhengShen_Attatchment(id);
        }

        public bool GuaZhiJieShu(string ID, DateTime? dt, int guazhijihuaid)
        {
            return bo.GuaZhiJieShu(ID, dt, guazhijihuaid);
        }

        #region 借用管理


        public bool SaveJY(Emp_JYModel entity, bool isAdd)
        {
            return jybo.SaveJY(entity,isAdd);
        }

        public bool JYJS(Emp_JYModel entity)
        {
            return jybo.JYJS(entity);
        }

        public bool JYDel(string con)
        {
            return jybo.JYDel(con);
        }

        public ObservableCollection<Emp_JYModel> GetJY(string con, int index, int pagesize)
        {
            return jybo.GetJY(con,index,pagesize);
        }

        public int GetJYCount(string con)
        {
            return jybo.GetJYCount(con);
        }

        #endregion
    }
}
